const xinbiao = process.env.VUE_APP_API_URL_XINBIAO;
const xuekui = process.env.VUE_APP_API_URL_XUEKUI;

const xinbiaoObj = {
  getModelList: "/modeling/search", //本体列表
  createOntology: "/modeling/add", // 创建本体
  editOntology: "/modeling/edit", // 编辑本体
  uploadImg: "/modeling/uploadimg", // 上传图片
  getNodeDetail: "/modeling/ontologyDetail", // 查看图谱中的节点详情
  getRelationDetail: "/modeling/getRelationDetail", // 查看图谱中的连线详情
  positionNode: "/modeling/position", // 图谱中的节点定位
  getParentProperty: "/modeling/getParentProperty", // 获取父节点的属性信息
  searchall: "/modeling/searchall", // 获取所有的本体模型下拉列表
  searchontology: "/modeling/searchontology", // 获取当前本体模型下的本体类别列表
  changeSort: "/modeling/changeSort", // 拖拽修改排序
  searchOntologyProperty: "/modelingManage/searchOntologyProperty", // 获取当前本体类别的属性列表
  addOntologyProperty: "/modelingManage/addOntologyProperty", // 给本体类别的属性列表添加数据
  editOntologyProperty: "/modelingManage/editOntologyProperty", // 编辑本体类别的属性列表
  deleteOntologyProperty: "/modelingManage/deleteOntologyProperty", // 删除本体类别的属性列表
  searchRealation: "/modelingManage/searchRealation", // 获取本体关系的列表
  searchRelationProperty: "/modelingManage/searchRelationProperty", // 获取本体关系的边属性列表
  addRelationProperty: "/modelingManage/addRelationProperty", // 给本体关系的边属性列表添加数据
  editRelationProperty: "/modelingManage/editRelationProperty", // 编辑本体关系的边属性列表的数据
  deleteRelationProperty: "/modelingManage/deleteRelationProperty", // 编辑本体关系的边属性列表的数据
  downloadModel: "/modeling/getModelUrl", // 获取导入模板链接
  exportOntology: "/modeling/exportOntology",
  propertyShow: "/modeling/property/show",
  deleteOntology: "/modeling/delete",
};

const xuekuiObj = {
  getAllData: "/modeling/getAllData", // 建模(获取图谱数据)
  getParentNodes: "/modeling/getAllOntologyMenu", // 查询父节点(关系树形式)
  saveNode: "/modeling/saveOntology", // 新增节点
  editNode: "/modeling/editOntology", // 编辑节点
  deleteNode: "/modeling/deleteOntology", // 删除节点
  saveEdge: "/modeling/addOntologySpo", // 新增线
  editEdge: "/modeling/editOntologySpo", // 编辑线
  deleteOntologySpo: "/modeling/deleteOntologySpo", // 删除线
  getAvailableElementData: "/modeling/getAvailableElementData", // 可用组件列表
  importElement: "/modeling/importElement", // 导入组件
  saveElement: "/modeling/saveElement", // 保存组件
  getElementData: "/modeling/getElementData", // 获取构件列表
  editElement: "/modeling/editElement", // 编辑构件
  addOntology: "/modelingManage/addOntology", // 新建本体类
  updateOntology: "/modelingManage/updateOntology", // 编辑本体类
  disableOntology: "/modelingManage/disableOntology", // 禁用本体类
  enableOntology: "/modelingManage/enableOntology", // 启用本体类
  addSpo: "/modelingManage/addSpo", // 新增本体类关系
  editSpo: "/modelingManage/editSpo", // 编辑本体类关系
  disableSpo: "/modelingManage/disableSpo", // 禁用本体类关系
  enableSpo: "/modelingManage/enableSpo", // 启用本体类关系
  uploladModel: "/modeling/batchImportOntologyAndSpo", // 批量导入本体
  configurationOntologyColor: "/modeling/configurationOntologyColor", // 编辑节点颜色
  configurationSpoColor: "/modeling/configurationSpoColor", // 编辑边颜色
  enableOntology111: "/modeling/enableOntology", // 添加节点提示存在后的启用节点接口
  enableOntologySpo: "/modeling/enableOntologySpo", // 添加连线提示存在后的启用连线接口
  getImg: "/modeling/getImg", // 根据图片资源地址获取流文件的接口
  undo: "/modeling/undo", // 撤销操作
  clearGraph: "/modeling/clearGraph", // 清空画布
  expandGraph: "/modeling/expandGraph",//双击节点进行展开功能接口
};

function changeBaseUrl() {
  for (let key in xinbiaoObj) {
    xinbiaoObj[key] = xinbiao + xinbiaoObj[key];
  }
  for (let key in xuekuiObj) {
    xuekuiObj[key] = xuekui + xuekuiObj[key];
  }
}
changeBaseUrl();

export default {
  xinbiaoObj,
  xuekuiObj,
};
